export namespace UserApiType {
  // 登录token
  export interface LoginInterface {
    token?: string;
  }

  // 登录请求表单
  export interface UserInterface {
    name: string;
    password: string;
    code: string;
  }

  // 权限列表
  export interface Roles {
    id: number;
    name: string;
    description: string;
  }

  // 用户信息
  export interface Info {
    createAt: string;
    updateAt: string;
    id: number;
    name: string;
    imgUrl?: string;
    status: boolean;
    email?: string;
    mobile?: string;
    curriculumVitae?: string;
    roles: Roles[];
    permissions: string[];
  }

  export interface ChangeInfo {
    name?: string;
    imgUrl?: string;
    email?: string;
    mobile?: string;
    password?: string;
    password_confirm?: string;
  }

  export interface ChangePassword {
    password?: string;
    password_confirm?: string;
  }

  // 更改用户权限信息请求参数
  export interface ChangeRolesInterface {
    userId: number | null;
    roles: number[];
  }
}
